<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        function Foo(name, age) {
            this.name = name;
            this.age = age;
            //return this; //默认有这一行。new一个构造函数，返回一个对象
        }
        var fn1 = new Foo('smyhvae', 26);
        var fn2 = new Foo('vae', 30); //new多个实例对象
    </script>
</body>

</html>